package com.company.gas.mapper;

import com.company.gas.pojo.Repair;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

//mybatis的mapper类
@Mapper
@Repository
public interface RepairMapper {
    List<Repair> selectAll();

    Repair queryRepairById(@Param(value = "repId") String repId);

    int addRepair(@Param(value = "repId") String repId, @Param(value = "cusId") String cusId,
                  @Param(value = "staffId") String staffId,
                  @Param(value = "repDate") Date repDate, @Param(value = "flag") Integer flag,
                  @Param(value = "createTime") Date createTime, @Param(value = "createBy") String createBy,
                  @Param(value = "modifyTime") Date modifyTime, @Param(value = "modifyBy") String modifyBy);

    int updateRepair(@Param(value = "repId") String repId,
                     @Param(value = "cusId") String cusId,
                     @Param(value = "repDate") Date repDate,
                     @Param(value = "modifyTime") Date modifyTime, @Param(value = "modifyBy") String modifyBy);

    int deleteRepair(@Param("repId") String repId);
}